//
//  YRPlayerSlider.swift
//  TestPlaySlider
//
//  Created by 薛永伟 on 2019/9/25.
//  Copyright © 2019 XueYongWei. All rights reserved.
//

import UIKit

class YRPlayerSlider: YRDisplayValueSlider {

    override func setup() {
        
        super.setup()
        self.minimumValue = 0.0
        self.isContinuous = false
        self.minimumTrackTintColor = UIColor.init(rgb: 0xE1BA61)
        self.maximumTrackTintColor = UIColor.clear
    }
    
    
    /// 更新妙数
    func updateSeconds(_ seconds:Int,total:Int){
        
        if isTouchInside {
            print("正在交互")
            return
        }
        
        if seconds > total {
            self.maximumValue = Float(total)
            self.value =  Float(total)
            return
        }
        self.maximumValue = Float(total)
        self.value =  Float(seconds)
        
    }
    

}
